<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="../assets/mui/css/mui.css"/>
    <script src="../assets/mui/js/mui.js"></script>
    <script src="../assets/css-switch.js"></script>
    <script>
      window.addEventListener('load', function() {
        var buttonEl = document.getElementsByClassName('mui-btn')[0];

        buttonEl.addEventListener('click', function() {
          var modalEl = document.createElement('div');
          modalEl.style.width = '300px';
          modalEl.style.height = '1000px';
          modalEl.style.margin = '30px auto';
          modalEl.style.backgroundColor = '#fff';

          var options = {onclose: function() {console.log('onclose');}};
          mui.overlay('on', options, modalEl);
        });
      });
    </script>
  </head>
  <body>
    <header style="position:fixed;top:0;left:0;right:0;height:50px;z-index:2;background-color:blue;"></header>
    <div class="mui-container">
      <h1>Overlay</h1>
      <div class="mui-panel">
        <button class="mui-btn mui-btn--primary">Activate</button>
      </div>
    </div>
    <div style="width:10px;height:1000px;background-color:red;">
  </body>
</html>
